package lxx.springbootdemo.schedule;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

@Component
public class scheduleJob {

//    @Scheduled(fixedRate = 2000)
//    public void fixedRate(){
//        System.out.println("fixRate"+ LocalDateTime.now());
//    }
//
//    @Scheduled(fixedDelay = 2000)
//    public void fixedDelay(){
//        System.out.println("fixDelay"+LocalDateTime.now());
//    }
//
//    @Scheduled(initialDelay = 2000,fixedDelay = 1000)
//    public void initialDelay(){
//        System.out.println("initialDelay"+LocalDateTime.now());
//    }


//    @Scheduled(cron = "1/3 * * * * *")
//    public void cron() {
//        System.out.println("cron" + LocalDateTime.now());
//    }



}
